package ysq.xyg.shop.service;

import ysq.xyg.base.model.dto.ReturnEntity;
import ysq.xyg.base.service.BaseService;
import ysq.xyg.shop.model.po.ShopOrder;
import ysq.xyg.sys.model.po.SysUser;
import ysq.xyg.shop.model.vo.ShopOrderVo;

import java.util.List;

/**
 * 商城模块-商品订单管理service接口
 *
 * @author congcong tao
 * @date 2019-8-17 8:12:11
 */
public interface ShopOrderService extends BaseService<ShopOrder> {

    /**
     * 分页查询
     *
     * @param shopOrderVo 对象
     * @param pageSize 当前页面
     * @param pageNum 页面数量
     * @return ReturnEntity 对象
     * @author congcong tao
     * @date 2019-8-17 8:12:11
     */
    ReturnEntity page(ShopOrderVo shopOrderVo, int pageSize, int pageNum);

    /**
     * 关联分页查询
     * @param shopOrderVo
     * @param pageSize
     * @param pageNum
     * @author congcong tao
     * @date 2019/8/26 16:28
     */
    ReturnEntity pageLeft(ShopOrderVo shopOrderVo, int pageSize, int pageNum);

    /**
     * 修改
     *
     * @param shopOrderVo 对象
     * @param currentUser 当前用户
     * @return ReturnEntity 对象
     * @author congcong tao
     * @date 2019-8-17 8:12:11
     */
    ReturnEntity addOrUpdate(ShopOrderVo shopOrderVo, SysUser currentUser);

    /**
     * 删除
     *
     * @param id 主键id删除
     * @param currentUser 当前用户
     * @return ReturnEntity 对象
     * @author congcong tao
     * @date 2019-8-17 8:12:11
     */
    ReturnEntity delete(String id, SysUser currentUser);

    /**
     * 获取集合
     *
     * @param shopOrderVo 对象
     * @return List<ShopOrder> ShopOrder集合
     * @author congcong tao
     * @date 2019-8-17 8:12:11
     */
    List<ShopOrder> acceptList(ShopOrderVo shopOrderVo);

    /**
     * 兑换商品
     * @param itemId
     * @param memberId
     * @author congcong tao
     * @date 2019/8/17 8:20
     */
    ReturnEntity shopOrderSave(String itemId, String memberId, String memberName, String memberPhone, String memberAddress);

    /**
     * 更新状态
     * @param id
     * @param status
     * @param manageRemark
     * @author congcong tao
     * @date 2019/8/26 16:32
     */
    ReturnEntity updateStatus(String id, String status, String manageRemark);
}
